﻿@model MvcApplication1.Models.RegisterModel

@{
    ViewBag.Title = "Register";
}


<p>
    创建新账户
</p>
<p>
    密码最少 @ViewBag.PasswordLength 位长
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    var urltoverify = '@Url.Action("SiteVerify")';
    var urltodownloadverify='@Url.Action("DownloadVerifyFile")';
</script>
<script src="@Url.Content("~/Scripts/siteregister.js")" type="text/javascript"></script>

@if (false) {
<script src="../../Scripts/jquery-1.4.4-vsdoc.js" type="text/javascript"></script>
}

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "创建账户失败，请重试")
    <div>
        <fieldset>
            <legend>账户信息</legend>

            @*<div class="editor-label">
                @Html.LabelFor(m => m.BrandName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.BrandName)
                @Html.ValidationMessageFor(m => m.BrandName)
            </div>*@

            <div class="editor-label">
                @Html.LabelFor(m => m.LinkAddr)
            </div>
            <div id='siteverifybtnblock' class="editor-field">
                @Html.TextBoxFor(m => m.LinkAddr)
                @Html.ValidationMessageFor(m => m.LinkAddr)
                <input id="siteverify" type="button" value="验证网站" />
            </div>
            <div id="SiteVerifyWidgetVerifyMethodBlock" class="verify-block" style="display:none">
                <div id="domain-block">
                <p class="display">
                @*<b>www.</b>*@
                <span id="SiteVerifyWidgetDomainDisplay"></span>
                <span class="status-complete" style="display:none">已验证</span>
                <q title="修改域名需要重新验证" id="SiteVerifyWidgetDomainChangeBtn">修改域名</q>
                </p>
                </div>
                <div id="SiteVerifyWidgetVerifyMethodContent">
                    <div class="tab-content-group">
                        <ul class="tab-content   active" tab-content="0">
                            <li><span>1</span>
                                <button type="button" id="SiteVerifyWidgetVerifyFileDownloadUrl" class="ui-button">下载验证文件</button></li>
                            <li><span>2</span>将验证文件放置于您所配置域名(如www.yoursite.com)的根目录下</li>
                            <li><span>3</span>点击“完成验证”按钮</li>
                        </ul>
                    </div>
                    <p class="extra">
                        请在30分钟内完成以上步骤</p>
                    <p class="opt">
                        <button type="button" id="SiteVerifyWidgetVerifyTestBtn" class="verify ui-button">完成验证</button>
                        <button type="button" id="SiteVerifyWidgetVerifyCancelBtn" class="verify ui-button">取消</button>
                    </p>
                    <p class="ui-validityshower-info info hint">为保护您的权益，请先对您的网站进行验证，才能继续注册。</p>
                    <p  style="display:none;color:Red" id="ui-validityshower-failure info error">获取验证文件失败或文件错误，请您确认正确放置后，再次点击“完成验证”按钮</p>
                    <p style="display:none;color:Red" id="ui-validityshower-success info success">验证成功，请继续完成注册过程</p>
                </div>
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.BrandName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.BrandName)
                @Html.ValidationMessageFor(m => m.BrandName)
            </div>

            @*<div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>*@

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>
            <div>
                @Html.Hidden("isvalidate", "0",new{ data_val="true",data_val_range="请先验证您的网站再进行注册，谢谢",data_val_range_min="1",data_val_range_max="1"})
                @Html.ValidationMessage("isvalidate")
            </div>
            <p>
                <input type="submit" value="Register" />
            </p>
        </fieldset>
    </div>
    
}
<div class="abs-box" id="AjaxLoading"><div class="loadingWord"><img src="@Url.Content("~/Content/themes/base/images/waiting.gif")">加载中，请稍候...</div></div>
